<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../vue.js"></script>
</head>
  <style>
    .active{
      width: 200px;
      height: 200px;
      background-color: darkkhaki;
    }
  </style>
<body>
  <div id="app">
    <!--
       v-bind 数据单项强制绑定 
       class属性，style属性，href属性 src属性等等 
    -->
    <h1 v-bind:class="msg">{{msg}}</h1>
    <input type="text" :value="value">
    <div :class="className"></div>
  </div>
  <script>
    Vue.config.productionTip = false;
    const vm = new Vue({
      el: "#app",
      data() {
        return {
          msg: "hello vue!",
          value: 'vue',
          className: 'active'
        }
      },
      methods: {}
    })
  </script>
</body>

</html>